package com.lechuang.member.controller;


import com.lechuang.common.result.Result;
import com.lechuang.member.manager.MemberGroupBuyManager;
import com.lechuang.member.manager.MemberLevelManager;
import com.lechuang.member.vo.MemberGroupBuyLevelVo;
import com.lechuang.member.vo.MemberLevelVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/memberGroupBuy")
@Log4j2
@Tag(name = "会员团购类")
public class MemberGroupBuyLevelController {

    @Resource
    private MemberGroupBuyManager memberGroupBuyManager;


    @Operation(summary = "团购等级列表查询")
    @PostMapping("/queryList")
    public Result<List<MemberGroupBuyLevelVo>> queryList(){
        log.info("会员等级列表------");
        List<MemberGroupBuyLevelVo> memberGroupBuyLevelVos  = memberGroupBuyManager.list();
        return Result.success(memberGroupBuyLevelVos);
    }
}
